import cv2
import numpy as np
img = np.zeros((400,400,3),dtype="uint8")
center=(round(400/2),round(400/2))
size=(100,200)
# 轴的长度
for i in range(0,5):
    # 偏移角度
    angle = np.random.randint(0,361)
    # 生成随机颜色，3 个[0,256)的随机数
    color = np.random.randint(0,high = 256,size = (3,)).tolist()
    # 随机粗细
    thickness = np.random.randint(1,9)
    cv2.ellipse(img, center, size, angle, 0, 360, color,thickness)
cv2.imshow("cv2.ellipse",img)
cv2.waitKey(0)
cv2.destroyAllWindows()
